const path = require('path')

module.exports = {
  publicPath: './',
  assetsDir: 'static',
  productionSourceMap: false,

  configureWebpack: {
    resolve: {
      extensions: ['.js', '.vue'],
      alias: {
        services: path.resolve(__dirname, 'src/services/'),
        components: path.resolve(__dirname, 'src/components'),
        pages: path.resolve(__dirname, 'src/pages'),
        helper: path.resolve(__dirname, 'src/helper')
      }
    }
  },
  /* 注意sass，scss，less的配置 */
  css: {
    loaderOptions: {
      sass: {
        prependData: `@import "@/assets/css/_variable.scss";` //引入全局变量   
      }
    }, // Enable CSS modules for all css / pre-processor files. // This option does not affect *.vue files.
  },
  // devServer: {
  //   proxy: {
  //     '/hardcode': {
  //       target: 'https://www.penicillin.cn/hardcode',
  //       changeOrigin: true,
  //       pathRewrite: {
  //         '^/hardcode': ''
  //       }
  //     }     
  //   }
  // }
}